﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BLL;

namespace QuanLyDatDai
{
    public partial class FrmDaGiac : Form
    {
        public FrmDaGiac()
        {
            InitializeComponent();
        }

        private void FrmDaGiac_Load(object sender, EventArgs e)
        {
            try
            {
                mapImage1.Map = DaGiac.KhoiTaoDaGiac(MangThuaDat);
                mapImage1.Refresh();
            }
            catch(Exception ex) {
                MessageBox.Show(ex.Message,"Lỗi");
            }
            
        }

        private void btnZoomIn_Click(object sender, EventArgs e)
        {
            mapImage1.ActiveTool = SharpMap.Forms.MapImage.Tools.ZoomIn;
            mapImage1.Refresh();
        }

        private void btnZoomOut_Click(object sender, EventArgs e)
        {
            mapImage1.ActiveTool = SharpMap.Forms.MapImage.Tools.ZoomOut;
        }

        private void btnPan_Click(object sender, EventArgs e)
        {
            mapImage1.ActiveTool = SharpMap.Forms.MapImage.Tools.None;
            mapImage1.ActiveTool = SharpMap.Forms.MapImage.Tools.Pan;
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        public string[] MangThuaDat { get; set; }
    }
}
